.TH "libwget-printf" 3 "Thu Aug 31 2023" "Version 2.1.0" "lingmoGet" \" -*- nroff -*-
.ad l
.nh
.SH NAME
libwget-printf \- Libwget printf functions
.SH SYNOPSIS
.br
.PP
.SS "Functions"

.in +1c
.ti -1c
.RI "size_t \fBwget_vasprintf\fP (char **strp, const char *fmt, va_list args)"
.br
.ti -1c
.RI "size_t \fBwget_asprintf\fP (char **strp, const char *fmt,\&.\&.\&.)"
.br
.ti -1c
.RI "char * \fBwget_vaprintf\fP (const char *fmt, va_list args)"
.br
.ti -1c
.RI "char * \fBwget_aprintf\fP (const char *fmt,\&.\&.\&.)"
.br
.ti -1c
.RI "size_t \fBwget_vfprintf\fP (FILE *fp, const char *fmt, va_list args)"
.br
.ti -1c
.RI "size_t \fBwget_fprintf\fP (FILE *fp, const char *fmt,\&.\&.\&.)"
.br
.ti -1c
.RI "size_t \fBwget_printf\fP (const char *fmt,\&.\&.\&.)"
.br
.ti -1c
.RI "size_t \fBwget_vsnprintf\fP (char *str, size_t size, const char *fmt, va_list args)"
.br
.ti -1c
.RI "size_t \fBwget_snprintf\fP (char *str, size_t size, const char *fmt,\&.\&.\&.)"
.br
.in -1c
.SH "Detailed Description"
.PP 
This is a collection of printf-style functions that are used with libwget and/or Wget2 code\&. They may be useful to other developers that is why they are exported\&. 
.SH "Function Documentation"
.PP 
.SS "size_t wget_vasprintf (char ** strp, const char * fmt, va_list args)"

.PP
\fBParameters\fP
.RS 4
\fIstrp\fP Pointer to hold the string output 
.br
\fIfmt\fP Printf-like format specifier 
.br
\fIargs\fP va_list of arguments 
.RE
.PP
\fBReturns\fP
.RS 4
Length of the string returned via \fCstrp\fP or \fC(size_t) -1\fP on error
.RE
.PP
Prints arguments to allocated memory and 0-terminates it\&. The string is returned via the first argument\&. It has to be free()'d by the caller when it is no longer needed\&. 
.SS "size_t wget_asprintf (char ** strp, const char * fmt,  \&.\&.\&.)"

.PP
\fBParameters\fP
.RS 4
\fIstrp\fP Pointer to hold the string output 
.br
\fIfmt\fP Printf-like format specifier 
.br
\fI\&.\&.\&.\fP List of arguments 
.RE
.PP
\fBReturns\fP
.RS 4
Length of the string returned via \fCstrp\fP 
.RE
.PP
Prints arguments to allocated memory and 0-terminates it\&. The string is returned via the first argument\&. It has to be free()'d by the caller when it is no longer needed\&. 
.SS "char * wget_vaprintf (const char * fmt, va_list args)"

.PP
\fBParameters\fP
.RS 4
\fIfmt\fP Printf-like format specifier 
.br
\fIargs\fP va_list of arguments 
.RE
.PP
\fBReturns\fP
.RS 4
Pointer to 0-terminated string in memory
.RE
.PP
Prints arguments to memory and returns a pointer to allocated and 0-terminated chunk of memory\&. The return value has to be free()'d by the caller when it is no longer needed\&. 
.SS "char * wget_aprintf (const char * fmt,  \&.\&.\&.)"

.PP
\fBParameters\fP
.RS 4
\fIfmt\fP Printf-like format specifier 
.br
\fI\&.\&.\&.\fP List of arguments 
.RE
.PP
\fBReturns\fP
.RS 4
Pointer to 0-terminated string in memory
.RE
.PP
Prints arguments to memory and returns a pointer to allocated and 0-terminated chunk of memory\&. The return value has to be free()'d by the caller when it is no longer needed\&. 
.SS "size_t wget_vfprintf (FILE * fp, const char * fmt, va_list args)"

.PP
\fBParameters\fP
.RS 4
\fIfp\fP FILE pointer 
.br
\fIfmt\fP Printf-like format specifier 
.br
\fIargs\fP List of arguments 
.RE
.PP
\fBReturns\fP
.RS 4
Number of bytes written or -1 on error
.RE
.PP
Prints arguments to stream \fCfp\fP and returns number of bytes written\&. 
.SS "size_t wget_fprintf (FILE * fp, const char * fmt,  \&.\&.\&.)"

.PP
\fBParameters\fP
.RS 4
\fIfp\fP FILE pointer 
.br
\fIfmt\fP Printf-like format specifier 
.br
\fI\&.\&.\&.\fP List of arguments 
.RE
.PP
\fBReturns\fP
.RS 4
Number of bytes written or -1 on error
.RE
.PP
Prints arguments to stream \fCfp\fP and returns number of bytes written\&. 
.SS "size_t wget_printf (const char * fmt,  \&.\&.\&.)"

.PP
\fBParameters\fP
.RS 4
\fIfmt\fP Printf-like format specifier 
.br
\fI\&.\&.\&.\fP List of arguments 
.RE
.PP
\fBReturns\fP
.RS 4
Number of bytes written or -1 on error
.RE
.PP
Prints arguments to \fCstdout\fP and returns number of bytes written\&. 
.SS "size_t wget_vsnprintf (char * str, size_t size, const char * fmt, va_list args)"

.PP
\fBParameters\fP
.RS 4
\fIstr\fP Destination buffer 
.br
\fIsize\fP Size of \fCstr\fP 
.br
\fIfmt\fP Printf-like format specifier 
.br
\fIargs\fP List of arguments 
.RE
.PP
\fBReturns\fP
.RS 4
Number of bytes written, or, on truncation, that would have been written
.RE
.PP
Prints arguments to buffer \fCstr\fP and returns number of bytes written, or on truncation: that would have been written\&.
.PP
If \fCstr\fP is NULL the return value are the number of bytes that would have been written\&. 
.SS "size_t wget_snprintf (char * str, size_t size, const char * fmt,  \&.\&.\&.)"

.PP
\fBParameters\fP
.RS 4
\fIstr\fP Destination buffer 
.br
\fIsize\fP Size of \fCstr\fP 
.br
\fIfmt\fP Printf-like format specifier 
.br
\fI\&.\&.\&.\fP List of arguments 
.RE
.PP
\fBReturns\fP
.RS 4
Number of bytes written, or, on truncation, that would have been written
.RE
.PP
Prints arguments to buffer \fCstr\fP and returns number of bytes written, or on truncation: that would have been written\&.
.PP
If \fCstr\fP is NULL the return value are the number of bytes that would have been written\&. 
.SH "Author"
.PP 
Generated automatically by Doxygen for lingmoGet from the source code\&.
